package com.probox.common.core.enums;

public enum CartStatusEnum {
    //1待结算 -1移除  2已结算
    unPaid("1","待结算"),
    remove("-1","移除"),
    paid("2","已结算");

    private CartStatusEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for(CartStatusEnum oe: CartStatusEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
